<template>

  <el-form :model="formData" label-width="auto" >
    <el-form-item label="中心编号">
      <el-input v-model="formData.department_no" />
    </el-form-item>
    <el-form-item label="患者编号">
      <el-input v-model="formData.patient_no" />
    </el-form-item>
    <el-form-item label="患者姓名">
      <el-input v-model="formData.name" />
    </el-form-item>

    <el-form-item label="研究类型">
      <el-select v-model="formData.study_type" clearable>
        <el-option v-for="(item, index) in studyTypeOptions" :key="index" :label="item.label" :value="item.value" />
      </el-select>
      <el-form-item label="签署知情同意书">
        <el-switch v-model="formData.informed_consent" inline-prompt active-text="同意" inactive-text="不同意" />
      </el-form-item>
    </el-form-item>
    <el-form-item label="研究医生">
      <el-input v-model="formData.researcher" />
    </el-form-item>
    <el-form-item label="入院日期">
      <el-date-picker :key="admission_date" v-model="admission_date" type="date" placeholder="请选择" :disabled-date="disabledDate" :shortcuts="shortcuts" />
    </el-form-item>

    <div class="form-collapse">
      <el-collapse accordion v-model="activeNames">
        <el-collapse-item title="纳入/排除标准" name="criteria">
          <el-form :model="formData.criteria" label-width="auto">
            <el-divider content-position="left">纳入标准（任何一项选"否"即不能纳入本研究）</el-divider>
            
            <el-row :gutter="20">
              <el-col :span="24">
                <el-form-item label="1.符合脑膜炎和脑炎诊断标准的患者（详见附表1）">
                  <el-switch v-model="formData.criteria.inclusion_criteria_1" 
                             inline-prompt 
                             active-text="是" 
                             inactive-text="否" />
                </el-form-item>
              </el-col>
            </el-row>
            
            <el-row :gutter="20">
              <el-col :span="24">
                <el-form-item label="2.住院患者">
                  <el-switch v-model="formData.criteria.inclusion_criteria_2" 
                             inline-prompt 
                             active-text="是" 
                             inactive-text="否" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">排除标准（任何一项选"是"即不能纳入本研究）</el-divider>
            
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="1.脑血管疾病">
                  <el-switch v-model="formData.criteria.exclusion_criteria_1" 
                             inline-prompt 
                             active-text="是" 
                             inactive-text="否" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="2.颅内肿瘤">
                  <el-switch v-model="formData.criteria.exclusion_criteria_2" 
                             inline-prompt 
                             active-text="是" 
                             inactive-text="否" />
                </el-form-item>
              </el-col>
            </el-row>
            
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="3.脑外伤患者">
                  <el-switch v-model="formData.criteria.exclusion_criteria_3" 
                             inline-prompt 
                             active-text="是" 
                             inactive-text="否" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="4.因各种因素而影响资料收集者">
                  <el-switch v-model="formData.criteria.exclusion_criteria_4" 
                             inline-prompt 
                             active-text="是" 
                             inactive-text="否" />
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </el-collapse-item>

        <el-collapse-item title="人口学资料" name="entrance">
          <el-form :model="formData.entrance" label-width="180px">
            <el-divider content-position="left">基本信息</el-divider>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="性别">
                  <el-radio-group v-model="formData.entrance.gender">
                    <el-radio :label="1">男</el-radio>
                    <el-radio :label="2">女</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="出生日期">
                  <el-date-picker type="date" v-model="formData.entrance.birthDate" style="width: 100%"/>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="民族">
                  <el-select v-model="formData.entrance.nation" style="width: 100%">
                    <el-option v-for="item in nationOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="婚否">
                  <el-radio-group v-model="formData.entrance.married">
                    <el-radio v-for="item in whetherOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="职业">
                  <el-select v-model="formData.entrance.job" clearable style="width: 100%">
                    <el-option v-for="(item, index) in jobOptions" :key="index" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="身高">
                  <el-input v-model.number="formData.entrance.height">
                    <template #append>cm</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="体重">
                  <el-input v-model.number="formData.entrance.weight">
                    <template #append>kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">个人嗜好</el-divider>
            <el-row :gutter="20">
              <el-col :span="24">
                <el-form-item label="吸烟">
                  <el-radio-group v-model="formData.entrance.smoke">
                    <el-radio v-for="item in whetherOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-radio-group>
                  <el-input v-model.number="formData.entrance.smoke_num" style="width: 120px; margin: 0 10px;">
                    <template #append>支/天</template>
                  </el-input>
                  <el-input v-model.number="formData.entrance.smoke_year" style="width: 120px;">
                    <template #append>年</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="24">
                <el-form-item label="饮酒">
                  <el-radio-group v-model="formData.entrance.drink">
                    <el-radio v-for="item in whetherOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-radio-group>
                  <el-select v-model="formData.entrance.drink_frequency" clearable style="width: 120px; margin: 0 10px;">
                    <el-option v-for="(item, index) in drinkFrequencyOption" :key="index" :label="item.label" :value="item.value" />
                  </el-select>
                  <el-input v-model.number="formData.entrance.drink_num" style="width: 120px;">
                    <template #append>克/天</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">感染情况</el-divider>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="HIV感染情况">
                  <el-radio-group v-model="formData.entrance.hiv_infection">
                    <el-radio v-for="item in whetherOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="CD4+T淋巴细胞计数">
                  <el-input v-model.number="formData.entrance.cd4t_lymphocyte">
                    <template #append>Cells/ul</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="发病前是否HAART治疗">
                  <el-radio-group v-model="formData.entrance.haart_treatment">
                    <el-radio v-for="item in whetherOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="药物组合">
                  <el-input v-model="formData.entrance.haart_treatment_medicine" type="textarea" autosize />
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">本病病史</el-divider>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="发病时间">
                  <el-date-picker type="date" v-model="formData.entrance.onset_time" style="width: 100%"/>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="确诊时间">
                  <el-date-picker type="date" v-model="formData.entrance.diagnosis_time" style="width: 100%"/>
                </el-form-item>
              </el-col>
            </el-row>

            <el-form-item label="是否按计划接种疫苗（≤6岁，包括水痘疫苗、手足口病疫苗、流感疫苗等）">
              <el-radio-group v-model="formData.entrance.plan_vaccinate">
                <el-radio v-for="item in whetherStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
              </el-radio-group>
            </el-form-item>
            <el-form-item label="是：填写疫苗名称" v-if="formData.entrance.plan_vaccinate === '2'">
              <el-input v-model="formData.entrance.plan_vaccinate_name" type="textarea" autosize />
            </el-form-item>
            <el-form-item label="否：填写漏种疫苗名称" v-if="formData.entrance.plan_vaccinate === '1'">
              <el-input v-model="formData.entrance.plan_vaccinate_miss_name" type="textarea" autosize />
            </el-form-item>
            
            <el-form-item label="近2年是否接种疫苗（>6岁）">
              <el-radio-group v-model="formData.entrance.last_2_years_vaccinate">
                <el-radio v-for="item in whetherStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
              </el-radio-group>
            </el-form-item>
            <el-form-item label="填写疫苗名称" v-if="formData.entrance.last_2_years_vaccinate === '2'">
              <el-input v-model="formData.entrance.last_2_years_vaccinate_name" type="textarea" autosize />
            </el-form-item>
            
            <el-divider content-position="left">其他病史</el-divider>
            <el-row :gutter="20" v-for="(item, index) in otherHistoryItems" :key="index">
              <el-col :span="24">
                <el-form-item :label="item.label">
                  <el-radio-group v-model="formData.entrance[item.key]">
                    <el-radio v-for="option in whetherOptions" :key="option.value" :label="option.label" :value="option.value" />
                  </el-radio-group>
                  <el-input
                    v-if="formData.entrance[item.key] === '2'"
                    v-model="formData.entrance[`${item.key}_name`]"
                    type="textarea"
                    :rows="2"
                    placeholder="请输入具体情况"
                    style="margin-top: 10px; width: 100%;"
                  />
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </el-collapse-item>

        <el-collapse-item title="生命特征" name="vitalSigns">
          <div class="vital-signs-note">生命体征（至少休息5分钟后测量血压、心率等项目）</div>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="体温">
                <el-input-number 
                  v-model="formData.vitalSigns.temperature" 
                  :precision="1" 
                  :step="0.1" 
                  :min="35" 
                  :max="42">
                  <template #append>℃</template>
                </el-input-number>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="呼吸">
                <el-input-number 
                  v-model="formData.vitalSigns.respiration" 
                  :min="0" 
                  :max="100">
                  <template #append>次/分</template>
                </el-input-number>
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="血压">
                <el-input-number 
                  v-model="formData.vitalSigns.blood_pressure_low" 
                  :min="0" 
                  :max="300" 
                />
                <span class="blood-pressure-separator">/</span>
                <el-input-number 
                  v-model="formData.vitalSigns.blood_pressure_high" 
                  :min="0" 
                  :max="300" 
                />
                <span class="blood-pressure-unit">mmHg</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="心率">
                <el-input-number 
                  v-model="formData.vitalSigns.heart_rate" 
                  :min="0" 
                  :max="300">
                  <template #append>次/分</template>
                </el-input-number>
              </el-form-item>
            </el-col>
          </el-row>
        </el-collapse-item>

        <el-collapse-item title="体格检查" name="physical">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="神志">
                <el-select v-model="formData.physical.mind" style="width: 100%">
                  <el-option v-for="item in mindOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="瞳孔">
                <el-select v-model="formData.physical.pupil" style="width: 100%">
                  <el-option v-for="item in pupilOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="瞳孔大小(mm)">
                <el-input-number v-model="formData.physical.pupil_left" :min="0" :max="10" :step="0.1" style="width: 40%" />
                <span style="margin: 0 2%;">左 / 右</span>
                <el-input-number v-model="formData.physical.pupil_right" :min="0" :max="10" :step="0.1" style="width: 40%" />
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="对光反射">
                <el-select v-model="formData.physical.light_reflex" style="width: 100%">
                  <el-option v-for="item in lightReflexOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="球结膜水肿">
                <el-radio-group v-model="formData.physical.chemosis">
                  <el-radio v-for="item in whetherOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="口唇紫绀">
                <el-radio-group v-model="formData.physical.cyanosis_lips">
                  <el-radio v-for="item in whetherOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-divider content-position="left">脑膜刺激征</el-divider>
          <el-row :gutter="20">
            <el-col :span="8">
              <el-form-item label="颈强">
                <el-select v-model="formData.physical.stiff_neck" style="width: 100%">
                  <el-option v-for="item in meningealOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="布氏征">
                <el-select v-model="formData.physical.brinell" style="width: 100%">
                  <el-option v-for="item in meningealOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="克氏征">
                <el-select v-model="formData.physical.kirschner" style="width: 100%">
                  <el-option v-for="item in meningealOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-divider content-position="left">生理反射</el-divider>
          <el-row :gutter="20">
            <el-col :span="8">
              <el-form-item label="浅反射">
                <el-select v-model="formData.physical.superficial_reflex" style="width: 100%">
                  <el-option v-for="item in reflexOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="16" v-if="formData.physical.superficial_reflex === 3">
              <el-form-item label="异常值">
                <el-input v-model="formData.physical.superficial_reflex_value" placeholder="请输入异常值" />
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="8">
              <el-form-item label="深反射">
                <el-select v-model="formData.physical.deep_reflex" style="width: 100%">
                  <el-option v-for="item in reflexOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="16" v-if="formData.physical.deep_reflex === 3">
              <el-form-item label="异常值">
                <el-input v-model="formData.physical.deep_reflex_value" placeholder="请输入异常值" />
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="8">
              <el-form-item label="病理反射">
                <el-select v-model="formData.physical.pathological_reflex" style="width: 100%">
                  <el-option v-for="item in reflexOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="16" v-if="formData.physical.pathological_reflex === 3">
              <el-form-item label="异常值">
                <el-input v-model="formData.physical.pathological_reflex_value" placeholder="请输入异常值" />
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="8">
              <el-form-item label="肌力">
                <el-select v-model="formData.physical.muscular_strength" style="width: 100%">
                  <el-option v-for="item in muscularStrengthOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="16" v-if="formData.physical.muscular_strength === 3">
              <el-form-item label="部位及肌力">
                <el-input v-model="formData.physical.muscular_strength_value" placeholder="请入部位及肌力" />
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="肌张力">
                <el-select v-model="formData.physical.muscular_tension" style="width: 100%">
                  <el-option v-for="item in muscularTensionOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-divider content-position="left">共济运动检查</el-divider>
          <el-row :gutter="20">
            <el-col :span="8">
              <el-form-item label="指鼻试验">
                <el-select v-model="formData.physical.finger_nose_test" style="width: 100%">
                  <el-option v-for="item in testOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="跟膝胫试验">
                <el-select v-model="formData.physical.heel_knee_shin_test" style="width: 100%">
                  <el-option v-for="item in testOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="轮替试验">
                <el-select v-model="formData.physical.rotate_test" style="width: 100%">
                  <el-option v-for="item in testOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="8">
              <el-form-item label="直线行走试验">
                <el-select v-model="formData.physical.straight_line_test" style="width: 100%">
                  <el-option v-for="item in testOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="闭目难立征">
                <el-select v-model="formData.physical.romberg" style="width: 100%">
                  <el-option v-for="item in testOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          
          <el-row :gutter="20">
            <el-col :span="8">
              <el-form-item label="睁眼">
                <el-select v-model="formData.physical.romberg_open" style="width: 100%">
                  <el-option v-for="item in rombergOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="闭眼">
                <el-select v-model="formData.physical.romberg_close" style="width: 100%">
                  <el-option v-for="item in rombergOptions" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
        </el-collapse-item>

        <el-collapse-item title="中医症状量化分级表" name="tcmSymptoms">
          <el-form :model="formData.tcmSymptoms" label-width="100px">
            <el-divider content-position="left">简单症状</el-divider>
            <el-row :gutter="20">
              <el-col :span="8">
                <el-form-item label="头痛">
                  <el-select v-model="formData.tcmSymptoms.headache" style="width: 100%">
                    <el-option v-for="item in headacheOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="项强">
                  <el-select v-model="formData.tcmSymptoms.stiff_neck" style="width: 100%">
                    <el-option v-for="item in stiffNeckOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="眩晕">
                  <el-select v-model="formData.tcmSymptoms.dizziness" style="width: 100%">
                    <el-option v-for="item in dizzinessOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="20">
              <el-col :span="8">
                <el-form-item label="嗜睡">
                  <el-select v-model="formData.tcmSymptoms.sleepiness" style="width: 100%">
                    <el-option v-for="item in sleepinessOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="抽搐">
                  <el-select v-model="formData.tcmSymptoms.convulsion" style="width: 100%">
                    <el-option v-for="item in convulsionOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="谵语">
                  <el-select v-model="formData.tcmSymptoms.delirium" style="width: 100%">
                    <el-option v-for="item in deliriumOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="20">
              <el-col :span="8">
                <el-form-item label="口渴">
                  <el-select v-model="formData.tcmSymptoms.thirst" style="width: 100%">
                    <el-option v-for="item in thirstOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="烦躁">
                  <el-select v-model="formData.tcmSymptoms.irritability" style="width: 100%">
                    <el-option v-for="item in irritabilityOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="倦怠">
                  <el-select v-model="formData.tcmSymptoms.fatigue" style="width: 100%">
                    <el-option v-for="item in fatigueOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="20">
              <el-col :span="8">
                <el-form-item label="呕吐">
                  <el-select v-model="formData.tcmSymptoms.vomiting" style="width: 100%">
                    <el-option v-for="item in vomitingOptions" :key="item.value" :label="item.label" :value="item.value" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="20">
              <el-col :span="6" v-for="item in simpleSymptoms" :key="item.key">
                <el-form-item :label="item.label">
                  <el-radio-group v-model="formData.tcmSymptoms[item.key]">
                    <el-radio :label="1">无</el-radio>
                    <el-radio :label="2">有</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">舌脉象指纹观察表</el-divider>

            <el-form-item label="观察情况">
              <el-radio-group v-model="formData.tcmSymptoms.tongue_pulse_observation">
                <el-radio :label="1">未查</el-radio>
                <el-radio :label="2">检查</el-radio>
              </el-radio-group>
            </el-form-item>

            <template v-if="formData.tcmSymptoms.tongue_pulse_observation === 2">
              <el-row :gutter="20">
                <el-col :span="12">
                  <el-form-item label="指纹">
                    <el-select v-model="formData.tcmSymptoms.fingerprint" multiple placeholder="请选择指纹特征" style="width: 100%">
                      <el-option v-for="item in fingerprintOptions" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
              
              <el-row :gutter="20">
                <el-col :span="8">
                  <el-form-item label="舌质">
                    <el-select v-model="formData.tcmSymptoms.tongue_color" multiple placeholder="请选择舌质" style="width: 100%">
                      <el-option v-for="item in tongueColorOptions" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="舌质部位">
                    <el-radio-group v-model="formData.tcmSymptoms.tongue_color_part">
                      <el-radio :label="1">全舌</el-radio>
                      <el-radio :label="2">局部</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="部位说明" v-if="formData.tcmSymptoms.tongue_color_part === 2">
                    <el-input v-model="formData.tcmSymptoms.tongue_color_remark" placeholder="请输入备注" />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row :gutter="20">
                <el-col :span="8">
                  <el-form-item label="苔质">
                    <el-select v-model="formData.tcmSymptoms.tongue_coated" multiple placeholder="请选择苔质特征" style="width: 100%">
                      <el-option v-for="item in tongueCoatedOptions" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="苔质部位">
                    <el-radio-group v-model="formData.tcmSymptoms.tongue_coated_park">
                      <el-radio :label="1">全舌</el-radio>
                      <el-radio :label="2">局部</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="部位说明" v-if="formData.tcmSymptoms.tongue_coated_park === 2">
                    <el-input v-model="formData.tcmSymptoms.tongue_coated_remark" placeholder="请输入备注" />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row :gutter="20">
                <el-col :span="8">
                  <el-form-item label="苔色">
                    <el-select v-model="formData.tcmSymptoms.tongue_coated_color" multiple placeholder="请选择苔色" style="width: 100%">
                      <el-option v-for="item in tongueCoatedColorOptions" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="苔色部位">
                    <el-radio-group v-model="formData.tcmSymptoms.tongue_coated_color_part">
                      <el-radio :label="1">全舌</el-radio>
                      <el-radio :label="2">局部</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="部位说明" v-if="formData.tcmSymptoms.tongue_coated_color_part === 2">
                    <el-input v-model="formData.tcmSymptoms.tongue_coated_color_remark" placeholder="请输入备注" />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row :gutter="20">
                <el-col :span="12">
                  <el-form-item label="左右脉一致">
                    <el-radio-group v-model="formData.tcmSymptoms.pulse_equal">
                      <el-radio :label="1">不一致</el-radio>
                      <el-radio :label="2">一致</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row :gutter="20">
                <el-col :span="12">
                  <el-form-item label="左脉">
                    <el-select v-model="formData.tcmSymptoms.pulse_left" multiple placeholder="请选择左脉特征" style="width: 100%">
                      <el-option v-for="item in pulseOptions" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="右脉">
                    <el-select v-model="formData.tcmSymptoms.pulse_right" multiple placeholder="请选择右脉特征" style="width: 100%">
                      <el-option v-for="item in pulseOptions" :key="item.value" :label="item.label" :value="item.value" />
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
            </template>
          </el-form>
        </el-collapse-item>

        <el-collapse-item title="实验室检查" name="labTests">
          <el-form :model="formData.labTests">
            <el-form-item label="血常规检测">
              <el-radio-group v-model="formData.labTests.blood_routine">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            <template v-if="formData.labTests.blood_routine === 2">
              <el-divider content-position="left">血常规检项</el-divider>
              
              <el-form :model="formData.bloodRoutine" label-width="180px">
                <el-row :gutter="20" v-for="item in bloodRoutineItems" :key="item.key">
                  <el-col :span="8">
                    <el-form-item :label="item.label">
                      <el-input v-model="formData.bloodRoutine[item.key]" type="number">
                        <template #append>{{ item.unit }}</template>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="结果判定">
                      <el-select v-model="formData.bloodRoutine[`${item.key}_result`]" style="width: 100%">
                        <el-option v-for="option in resultOptions" :key="option.value" :label="option.label" :value="option.value" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="异常临床描述" v-if="formData.bloodRoutine[`${item.key}_result`] === 3">
                      <el-input v-model="formData.bloodRoutine[`${item.key}_remark`]" type="textarea" :rows="2" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </template>

            <el-form-item label="其他炎症指标">
              <el-radio-group v-model="formData.labTests.other_inflammatory">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            <template v-if="formData.labTests.other_inflammatory === 2">
              <el-divider content-position="left">其他炎症指标项</el-divider>
              
              <el-form :model="formData.otherInflammatory" label-width="180px">
                <el-row :gutter="20" v-for="item in otherInflammatoryItems" :key="item.key">
                  <el-col :span="8">
                    <el-form-item :label="item.label">
                      <el-input v-model="formData.otherInflammatory[item.key]" type="number">
                        <template #append>{{ item.unit }}</template>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="结果判定">
                      <el-select v-model="formData.otherInflammatory[`${item.key}_result`]" style="width: 100%">
                        <el-option v-for="option in resultOptions" :key="option.value" :label="option.label" :value="option.value" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="异常临床描述" v-if="formData.otherInflammatory[`${item.key}_result`] === 3">
                      <el-input v-model="formData.otherInflammatory[`${item.key}_remark`]" type="textarea" :rows="2" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </template>

            <el-form-item label="尿常规检测">
              <el-radio-group v-model="formData.labTests.urine_test">
                <el-radio :label="0">否</el-radio>
                <el-radio :label="1">正常</el-radio>
                <el-radio :label="2">异常</el-radio>
              </el-radio-group>
              <el-input v-if="formData.labTests.urine_test === 2" v-model="formData.labTests.urine_test_remark" placeholder="请输入异常情况" style="margin-top: 10px;" />
            </el-form-item>

            <el-form-item label="大便规检测">
              <el-radio-group v-model="formData.labTests.stool_test">
                <el-radio :label="0">否</el-radio>
                <el-radio :label="1">正常</el-radio>
                <el-radio :label="2">异常</el-radio>
              </el-radio-group>
              <el-input
                v-if="formData.labTests.stool_test === 2" v-model="formData.labTests.stool_test_remark" placeholder="请输入异常情况" style="margin-top: 10px;"
              />
            </el-form-item>

            <el-form-item label="肝功检测">
              <el-radio-group v-model="formData.labTests.sgot_test">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            <template v-if="formData.labTests.sgot_test === 2">
              <el-divider content-position="left">肝功检测项</el-divider>
              
              <el-form :model="formData.liverFunction" label-width="180px">
                <el-row :gutter="20" v-for="item in liverFunctionItems" :key="item.key">
                  <el-col :span="8">
                    <el-form-item :label="item.label">
                      <el-input v-model="formData.liverFunction[item.key]" type="number">
                        <template #append>{{ item.unit }}</template>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="结果判定">
                      <el-select v-model="formData.liverFunction[`${item.key}_result`]" style="width: 100%">
                        <el-option v-for="option in resultOptions" :key="option.value" :label="option.label" :value="option.value" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="备注" v-if="formData.liverFunction[`${item.key}_result`] === 3">
                      <el-input v-model="formData.liverFunction[`${item.key}_remark`]" type="textarea" :rows="2" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </template>

            <el-form-item label="肾功检测">
              <el-radio-group v-model="formData.labTests.kidney_test">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            <template v-if="formData.labTests.kidney_test === 2">
              <el-divider content-position="left">肾功检测项</el-divider>
              
              <el-form :model="formData.kidneyFunction" label-width="180px">
                <el-row :gutter="20" v-for="item in kidneyFunctionItems" :key="item.key">
                  <el-col :span="8">
                    <el-form-item :label="item.label">
                      <el-input v-model="formData.kidneyFunction[item.key]" type="number">
                        <template #append>{{ item.unit }}</template>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="结果判定">
                      <el-select v-model="formData.kidneyFunction[`${item.key}_result`]" style="width: 100%">
                        <el-option v-for="option in resultOptions" :key="option.value" :label="option.label" :value="option.value" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="备注" v-if="formData.kidneyFunction[`${item.key}_result`] === 3">
                      <el-input v-model="formData.kidneyFunction[`${item.key}_remark`]" type="textarea" :rows="2" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </template>

            <el-form-item label="心肌酶检测">
              <el-radio-group v-model="formData.labTests.myocardial_enzyme_test">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            <template v-if="formData.labTests.myocardial_enzyme_test === 2">
              <el-divider content-position="left">心肌酶检测项</el-divider>
              
              <el-form :model="formData.myocardialEnzyme" label-width="180px">
                <el-row :gutter="20" v-for="item in myocardialEnzymeItems" :key="item.key">
                  <el-col :span="8">
                    <el-form-item :label="item.label">
                      <el-input v-model="formData.myocardialEnzyme[item.key]" type="number">
                        <template #append>{{ item.unit }}</template>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="结果判定">
                      <el-select v-model="formData.myocardialEnzyme[`${item.key}_result`]" style="width: 100%">
                        <el-option v-for="option in resultOptions" :key="option.value" :label="option.label" :value="option.value" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="备注" v-if="formData.myocardialEnzyme[`${item.key}_result`] === 3">
                      <el-input v-model="formData.myocardialEnzyme[`${item.key}_remark`]" type="textarea" :rows="2" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </template>

            <el-form-item label="空腹血糖检测">
              <el-radio-group v-model="formData.labTests.blood_glucose_test">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            <template v-if="formData.labTests.blood_glucose_test === 2">
              <el-divider content-position="left">空腹血糖检测项</el-divider>
              
              <el-form :model="formData.bloodGlucose" label-width="180px">
                <el-row :gutter="20">
                  <el-col :span="8">
                    <el-form-item label="血糖">
                      <el-input v-model="formData.bloodGlucose.blood_glucose" type="number">
                        <template #append>mmol/L</template>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="结果判定">
                      <el-select v-model="formData.bloodGlucose.blood_glucose_result" style="width: 100%">
                        <el-option v-for="option in resultOptions" :key="option.value" :label="option.label" :value="option.value" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="备注" v-if="formData.bloodGlucose.blood_glucose_result === 3">
                      <el-input v-model="formData.bloodGlucose.blood_glucose_remark" type="textarea" :rows="2" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </template>

            <el-form-item label="血清离子检测">
              <el-radio-group v-model="formData.labTests.serum_ion_test">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            <template v-if="formData.labTests.serum_ion_test === 2">
              <el-divider content-position="left">血清离子检测项</el-divider>
              
              <el-form :model="formData.serumIon" label-width="180px">
                <el-row :gutter="20" v-for="item in serumIonItems" :key="item.key">
                  <el-col :span="8">
                    <el-form-item :label="item.label">
                      <el-input v-model="formData.serumIon[item.key]" type="number">
                        <template #append>mmol/L</template>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="结果判定">
                      <el-select v-model="formData.serumIon[`${item.key}_result`]" style="width: 100%">
                        <el-option v-for="option in resultOptions" :key="option.value" :label="option.label" :value="option.value" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="备注" v-if="formData.serumIon[`${item.key}_result`] === 3">
                      <el-input v-model="formData.serumIon[`${item.key}_remark`]" type="textarea" :rows="2" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </template>

            <el-form-item label="凝血功能检测">
              <el-radio-group v-model="formData.labTests.blood_coagulation_test">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            <template v-if="formData.labTests.blood_coagulation_test === 2">
              <el-divider content-position="left">凝血功能检测项</el-divider>
              
              <el-form :model="formData.bloodCoagulation" label-width="180px">
                <el-row :gutter="20" v-for="item in bloodCoagulationItems" :key="item.key">
                  <el-col :span="8">
                    <el-form-item :label="item.label">
                      <el-input v-model="formData.bloodCoagulation[item.key]" type="number">
                        <template #append>{{ item.unit }}</template>
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="结果判定">
                      <el-select v-model="formData.bloodCoagulation[`${item.key}_result`]" style="width: 100%">
                        <el-option v-for="option in resultOptions" :key="option.value" :label="option.label" :value="option.value" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="备注" v-if="formData.bloodCoagulation[`${item.key}_result`] === 3">
                      <el-input v-model="formData.bloodCoagulation[`${item.key}_remark`]" type="textarea" :rows="2" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </template>

            <el-form-item label="血病原学检测">
              <el-radio-group v-model="formData.labTests.blood_pathogen_test">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            <div v-if="formData.labTests.blood_pathogen_test === 2">
              <el-divider content-position="left">血病原学检测项</el-divider>
              
              <el-form :model="formData.bloodPathogen" label-width="180px" label-position="left">
                <el-row :gutter="20">
                  <el-col :span="8" v-for="item in bloodPathogenItems" :key="item.key">
                    <el-form-item :label="item.label">
                      <el-select v-model="formData.bloodPathogen[item.key]" style="width: 20%">
                        <el-option label="否" :value="1" />
                        <el-option label="是" :value="2" />
                      </el-select>
                      <el-select 
                        v-if="formData.bloodPathogen[item.key] === 2"
                        v-model="formData.bloodPathogen[`${item.key}_result`]" 
                        style="width: 20%; margin-left: 10px"
                      >
                        <el-option label="阴性" :value="1" />
                        <el-option label="阳性" :value="2" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row :gutter="20">
                  <el-col :span="8">
                    <el-form-item label="TRUST或RPR滴度">
                      <el-select v-model="formData.bloodPathogen.trust_prp" style="width: 20%">
                        <el-option label="否" :value="1" />
                        <el-option label="是" :value="2" />
                      </el-select>
                      <el-select 
                        v-if="formData.bloodPathogen.trust_prp === 2"
                        v-model="formData.bloodPathogen.trust_prp_result" 
                        style="width: 20%; margin-left: 10px"
                      >
                        <el-option label="阴性" :value="1" />
                        <el-option label="阳性" :value="2" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="formData.bloodPathogen.trust_prp === 2 && formData.bloodPathogen.trust_prp_result === 2">
                    <el-form-item label="阳性滴度值">
                      <el-input v-model="formData.bloodPathogen.titre_positive_remark" style="width: 100%" />
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row :gutter="20">
                  <el-col :span="8">
                    <el-form-item label="干扰素释放实验(A+B)">
                      <el-select v-model="formData.bloodPathogen.igra" style="width: 20%">
                        <el-option label="否" :value="1" />
                        <el-option label="是" :value="2" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="formData.bloodPathogen.igra === 2">
                    <el-form-item label="实验(A)值">
                      <el-input v-model="formData.bloodPathogen.igra_a" style="width: 100%" />
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="formData.bloodPathogen.igra === 2">
                    <el-form-item label="实验(B)值">
                      <el-input v-model="formData.bloodPathogen.igra_b" style="width: 100%" />
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row :gutter="20">
                  <el-col :span="8">
                    <el-form-item label="血培养">
                      <el-select v-model="formData.bloodPathogen.blood_culture" style="width: 20%">
                        <el-option label="否" :value="1" />
                        <el-option label="是" :value="2" />
                      </el-select>
                      <el-select 
                        v-if="formData.bloodPathogen.blood_culture === 2"
                        v-model="formData.bloodPathogen.blood_culture_result" 
                        style="width: 20%; margin-left: 10px"
                      >
                        <el-option label="阴性" :value="1" />
                        <el-option label="阳性" :value="2" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="formData.bloodPathogen.blood_culture === 2 && formData.bloodPathogen.blood_culture_result === 2">
                    <el-form-item label="血培养菌种">
                      <el-input v-model="formData.bloodPathogen.blood_culture_strain" style="width: 100%" />
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row :gutter="20">
                  <el-col :span="8">
                    <el-form-item label="其它体液培养">
                      <el-select v-model="formData.bloodPathogen.other_body_fluid_culture" style="width: 20%">
                        <el-option label="否" :value="1" />
                        <el-option label="是" :value="2" />
                      </el-select>
                      <el-select 
                        v-if="formData.bloodPathogen.other_body_fluid_culture === 2"
                        v-model="formData.bloodPathogen.other_body_fluid_culture_result" 
                        style="width: 20%; margin-left: 10px"
                      >
                        <el-option label="阴性" :value="1" />
                        <el-option label="阳性" :value="2" />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="formData.bloodPathogen.other_body_fluid_culture === 2 && formData.bloodPathogen.other_body_fluid_culture_result === 2">
                    <el-form-item label="其它体液培养菌种">
                      <el-input v-model="formData.bloodPathogen.other_body_fluid_culture_strain" style="width: 100%" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </div>
            
            <el-form-item label="脑脊液检测">
              <el-radio-group v-model="formData.labTests.csf">
                <el-radio :label="1">否</el-radio>
                <el-radio :label="2">是</el-radio>
              </el-radio-group>
            </el-form-item>
            
            <template v-if="formData.labTests.csf === 2">
              <el-divider content-position="left">脑脊液检测项</el-divider>
              
              <el-row :gutter="20">
                <el-col :span="8">
                  <el-form-item label="检查日期">
                    <el-date-picker v-model="formData.csfTest.checkup_time" type="datetime"></el-date-picker>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row :gutter="20">
                <el-col :span="8">
                  <el-form-item label="颜色">
                    <el-select v-model="formData.csfTest.color">
                      <el-option v-for="item in colorOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="透明度">
                    <el-select v-model="formData.csfTest.clarity">
                      <el-option v-for="item in clarityOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row :gutter="20">
                <el-col :span="8">
                  <el-form-item label="压力">
                    <el-select v-model="formData.csfTest.stress">
                      <el-option :label="'正常'" :value="1"></el-option>
                      <el-option :label="'异常'" :value="2"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="8" v-if="formData.csfTest.stress === 2">
                  <el-form-item label="异常描述">
                    <el-input v-model="formData.csfTest.stress_remark"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-divider content-position="left">细胞计数</el-divider>
              
              <el-row :gutter="20">
                <el-col :span="8" v-for="item in cellCountItems" :key="item.key">
                  <el-form-item :label="item.label">
                    <el-input v-model="formData.csfTest[item.key]">
                      <template #append>
                        <el-select v-model="formData.csfTest[`${item.key}_result`]" style="width: 150px">
                          <el-option v-for="option in resultOptions" :key="option.value" :label="option.label" :value="option.value"></el-option>
                        </el-select>
                      </template>
                    </el-input>
                  </el-form-item>
                  <el-form-item v-if="formData.csfTest[`${item.key}_result`] === 3">
                    <el-input v-model="formData.csfTest[`${item.key}_remark`]" placeholder="异常描述"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-divider content-position="left">其他检测项目</el-divider>
              
              <el-row :gutter="20">
                <el-col :span="8" v-for="item in otherTestItems" :key="item.key">
                  <el-form-item :label="item.label">
                    <el-switch
                      v-model="formData.csfTest[item.key]"
                      :active-value="2"
                      :inactive-value="1"
                      inline-prompt
                      active-text="是"
                      inactive-text="否"
                    ></el-switch>
                    <template v-if="formData.csfTest[item.key] === 2">
                      <el-select v-model="formData.csfTest[`${item.key}_result`]" style="margin-left: 10px; width: 80px">
                        <el-option label="阴性" :value="1"></el-option>
                        <el-option label="阳性" :value="2"></el-option>
                      </el-select>
                      <el-input 
                        v-if="formData.csfTest[`${item.key}_result`] === 2"
                        v-model="formData.csfTest[`${item.key}_positive`]" 
                        placeholder="阳性值" 
                        style="margin-top: 5px;"
                      ></el-input>
                    </template>
                  </el-form-item>
                </el-col>
              </el-row>        
            </template>
          </el-form>
        </el-collapse-item>

        <el-collapse-item title="辅助检查" name="auxiliaryTests">
          <el-form :model="formData.auxiliaryTests" >
            <template v-for="item in auxiliaryTestItems" :key="item.key">
              <el-form-item :label="item.label">
                <el-select v-model="formData.auxiliaryTests[item.key]">
                  <el-option v-for="option in auxiliaryTestOptions" :key="option.value" :label="option.label" :value="option.value" />
                </el-select>
              </el-form-item>
              
              <el-form-item :label="`${item.label}-检查时间`" v-if="formData.auxiliaryTests[item.key] !== 0">
                <el-date-picker
                  v-model="formData.auxiliaryTests[`${item.key}_checkup_time`]"
                  type="datetime"
                  placeholder="选择日期时间"
                />
              </el-form-item>
              
              <el-form-item :label="`${item.label}-描述`" v-if="formData.auxiliaryTests[item.key] !== 0">
                <el-input
                  v-model="formData.auxiliaryTests[`${item.key}_remark`]"
                  type="textarea"
                  :rows="2"
                  placeholder="请输入描述"
                />
              </el-form-item>
            </template>
          </el-form>
        </el-collapse-item>

        <el-collapse-item title="格拉斯哥昏迷评分" name="gcs">
          <el-form :model="formData.gcs" >
            <el-tabs v-model="activeGcsTab">
              <el-tab-pane label="成人" name="adult">
                <el-form-item label="是否镇静">
                  <el-radio-group v-model="formData.gcs.cr_gcs_sed">
                    <el-radio :label="0">否</el-radio>
                    <el-radio :label="1">是</el-radio>
                  </el-radio-group>
                </el-form-item>
                
                <template v-if="formData.gcs.cr_gcs_sed === 1">
                  <el-form-item label="药物名称">
                    <el-input v-model="formData.gcs.cr_gcs_medicine" />
                  </el-form-item>
                  <el-form-item label="药物计量单位">
                    <el-input v-model="formData.gcs.cr_gcs_medicine_dose" />
                  </el-form-item>
                </template>
                
                <el-form-item label="运动能力">
                  <el-select v-model="formData.gcs.cr_athletic_ability">
                    <el-option v-for="i in 6" :key="i" :label="i" :value="i" />
                  </el-select>
                </el-form-item>
                
                <el-form-item label="气管插管或切开">
                  <el-radio-group v-model="formData.gcs.cr_language_trachea">
                    <el-radio :label="0">否</el-radio>
                    <el-radio :label="1">是</el-radio>
                  </el-radio-group>
                </el-form-item>
                
                <el-form-item label="语言能力" v-if="formData.gcs.cr_language_trachea === 0">
                  <el-select v-model="formData.gcs.cr_language_ability">
                    <el-option v-for="i in 6" :key="i" :label="i" :value="i" />
                  </el-select>
                </el-form-item>
                
                <el-form-item label="睁眼能力">
                  <el-select v-model="formData.gcs.cr_eye_open_ability">
                    <el-option v-for="i in 6" :key="i" :label="i" :value="i" />
                  </el-select>
                </el-form-item>
              </el-tab-pane>
              
              <el-tab-pane label="儿童" name="child">
                <el-form-item label="是否镇静">
                  <el-radio-group v-model="formData.gcs.et_gcs_sed">
                    <el-radio :label="0">否</el-radio>
                    <el-radio :label="1">是</el-radio>
                  </el-radio-group>
                </el-form-item>
                
                <template v-if="formData.gcs.et_gcs_sed === 1">
                  <el-form-item label="药物名称">
                    <el-input v-model="formData.gcs.et_gcs_medicine" />
                  </el-form-item>
                  <el-form-item label="药物计量单位">
                    <el-input v-model="formData.gcs.et_gcs_medicine_dose" />
                  </el-form-item>
                </template>
                
                <el-form-item label="运动能力">
                  <el-select v-model="formData.gcs.et_athletic_ability">
                    <el-option v-for="i in 6" :key="i" :label="i" :value="i" />
                  </el-select>
                </el-form-item>
                
                <el-form-item label="气管插管或切开">
                  <el-radio-group v-model="formData.gcs.et_language_trachea">
                    <el-radio :label="0">否</el-radio>
                    <el-radio :label="1">是</el-radio>
                  </el-radio-group>
                </el-form-item>
                
                <el-form-item label="语言能力" v-if="formData.gcs.et_language_trachea === 0">
                  <el-select v-model="formData.gcs.et_language_ability">
                    <el-option v-for="i in 6" :key="i" :label="i" :value="i" />
                  </el-select>
                </el-form-item>
                
                <el-form-item label="睁眼能力">
                  <el-select v-model="formData.gcs.et_eye_open_ability">
                    <el-option v-for="i in 6" :key="i" :label="i" :value="i" />
                  </el-select>
                </el-form-item>
              </el-tab-pane>
            </el-tabs>
          </el-form>
        </el-collapse-item>

        <el-collapse-item title="SOFA评分" name="sofa">
          <el-form :model="formData.sofa" label-width="180px">
            <el-divider content-position="left">呼吸系统</el-divider>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="氧合指数（Kpa）">
                  <el-select v-model="formData.sofa.breath" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="呼吸支持">
                  <el-select v-model="formData.sofa.breath_support" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">凝血功能</el-divider>            
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="血小板（10^9/L）">
                  <el-select v-model="formData.sofa.platelet" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">肝功能</el-divider>    
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="胆红素（umol/L）">
                  <el-select v-model="formData.sofa.tbil" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">循环系统</el-divider>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="平均动脉压 (mmHg)">
                  <el-select v-model="formData.sofa.map" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="多巴胺剂量 (ug/kg/min)">
                  <el-select v-model="formData.sofa.dopamine" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="肾上腺素 (ug/kg/min)">
                  <el-select v-model="formData.sofa.epinephrine" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="去甲肾上腺素 (ug/kg/min)">
                  <el-select v-model="formData.sofa.noradrenaline" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="多巴酚丁胺（是/否）">
                  <el-select v-model="formData.sofa.dobutaminer" style="width: 100%">
                    <el-option v-for="i in 2" :key="i" :label="`${i-1}分`" :value="i-1" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">神经系统</el-divider>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="GCS评分">
                  <el-select v-model="formData.sofa.gcs" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">肾脏系统</el-divider>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="肾功能-肌酐（umol/L）">
                  <el-select v-model="formData.sofa.creatinine" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="肾功能-尿量（ml/24h）">
                  <el-select v-model="formData.sofa.tvu" style="width: 100%">
                    <el-option v-for="i in 4" :key="i" :label="`${i}分`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-divider content-position="left">胃肠系统</el-divider>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="胃肠功能评分">
                  <el-select v-model="formData.sofa.sofa_score" style="width: 100%">
                <el-option v-for="i in 4" :key="i" :label="`${i}级`" :value="i" />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
          <div class="sofa-note">备注：1.每日评估时应采取每日最差值；2.分数越高，预后越差</div>
        </el-collapse-item>
      </el-collapse>
    </div>
    </el-form>
</template>

<style scoped>
.vital-signs-note {
  margin-bottom: 15px;
  color: #606266;
  font-size: 14px;
}

.blood-pressure-separator {
  margin: 0 5px;
}

.blood-pressure-unit {
  margin-left: 5px;
  color: #909399;
}

.sofa-note {
  margin-top: 15px;
  color: #606266;
  font-size: 14px;
}
</style>

<script lang="ts" setup>
import { ref } from "vue";
import { reactive } from 'vue'

const activeNames = ref(['labTests'])
const activeGcsTab = ref('adult')

const formData = reactive({
  department_no: '',
  name: '',
  patient_no: '',
  researcher: '',
  informed_consent: false,
  study_type: '',
  criteria: {
      inclusion_criteria_1: true,
      inclusion_criteria_2: true,
      exclusion_criteria_1: true,
      exclusion_criteria_2: true,
      exclusion_criteria_3: true,
      exclusion_criteria_4: true
  },
  entrance: {
    gender: 1,
    birthDate: "",
    nation: "",
    married : '1',
    job: "",
    height: '',
    weight: '',
    smoke: '1',
    smoke_num: '',
    smoke_year: '',
    drink: '1',
    drink_frequency: '1',
    drink_num: "",
    hiv_infection: '1',
    cd4t_lymphocyte: '',
    haart_treatment: '1',
    haart_treatment_medicine: '',
    onset_time: '',
    diagnosis_time: '',
    plan_vaccinate: '1',
    plan_vaccinate_name: '',
    plan_vaccinate_miss_name: '',
    last_2_years_vaccinate: '1',
    last_2_years_vaccinate_name: '',
    touch_history: '1',
    touch_name: '',
    mosquito_bite_history: '1',
    mosquito_name: '',
    medicine_allergy_history: '1',
    medicine_allergy_name: '',
    family_disease_history: '1',
    family_disease_history_name: '',
    previous_history: '1',
    previous_history_name: '',
    prehospital_treatment_history: '1',
    prehospital_treatment_name: '',
    other_epidemiology: '1',
    other_epidemiology_name: ''
  },
  vitalSigns: {
    temperature: '',
    respiration: '',
    blood_pressure_low: '',
    blood_pressure_high: '',
    heart_rate: '',
  },
  csfTest: {
    checkup_time: '',
    color: '',
    clarity: '',
    stress: 1,
    stress_remark: '',
    cbc: '',
    cbc_result: '',
    cbc_remark: '',
    bacterial_smear: '',
    bacterial_smear_result: 1,
    bacterial_smear_remark: '',
    bacterial_culture: 1,
    bacterial_culture_result: 1,
    bacterial_culture_remark: '',
    fungal_culture: 1,
    fungal_culture_result: 1,
  },
  physical: {
    mind: null,
    pupil: null,
    pupil_left: null,
    pupil_right: null,
    light_reflex: null,
    chemosis: '1',
    cyanosis_lips: '1',
    stiff_neck: null,
    brinell: null,
    kirschner: null,
    superficial_reflex: null,
    superficial_reflex_value: '',
    deep_reflex: null,
    deep_reflex_value: '',
    pathological_reflex: null,
    pathological_reflex_value: '',
    muscular_strength: null,
    muscular_strength_value: '',
    muscular_tension: null,
    finger_nose_test: null,
    heel_knee_shin_test: null,
    rotate_test: null,
    straight_line_test: null,
    romberg: null,
    romberg_open: null,
    romberg_close: null,
  },
  tcmSymptoms: {
    fever: 1,
    fever_value: null,
    headache: 1,
    stiff_neck: 1,
    dizziness: 1,
    sleepiness: 1,
    convulsion: 1,
    delirium: 1,
    thirst: 1,
    irritability: 1,
    fatigue: 1,
    vomiting: 1,
    palpitations: 1,
    shortness_of_breath: 1,
    chest_tightness: 1,
    chest_pain: 1,
    abdominal_pain: 1,
    abdominal_distension: 1,
    diarrhea: 1,
    constipation: 1,
    edema: 1,
    petechia: 1,
    tinnitus: 1,
    bitter_mouth: 1,
    nausea: 1,
    cough: 1,
    phlegm: 1,
    weak: 1,
    wind_chill: 1,
    chills: 1,
    sweating: 1,
    rash: 1,
    tongue_pulse_observation: 1,
    tongue_color: [],
    tongue_color_part: 1,
    tongue_color_remark: '',
    tongue_body: [],
    tongue_coated: [],
    tongue_coated_park: 1,
    tongue_coated_remark: '',
    tongue_coated_color: [],
    tongue_coated_color_part: 1,
    tongue_coated_color_remark: '',
    pulse_equal: 2,
    pulse_left: [],
    pulse_right: [],
    fingerprint: [],
  },
  labTests: {
    blood_routine: 1,
    other_inflammatory: 1,
    urine_test: 0,
    urine_test_remark: '',
    stool_test: 0,
    stool_test_remark: '',
    sgot_test: 1,
    kidney_test: 1,
    myocardial_enzyme_test: 1,
    blood_glucose_test: 1,
    serum_ion_test: 1,
    blood_coagulation_test: 1,
    blood_pathogen_test: 1,
    csf: 1,
  },
  bloodRoutine: {
    leukocyte_count: null,
    leukocyte_result: 0,
    leukocyte_remark: '',
    neutrophil_percentage: null,
    neutrophil_result: 0,
    neutrophil_remark: '',
    lymphocyte_percentage: null,
    lymphocyte_result: 0,
    lymphocyte_remark: '',
    erythrocyte_count: null,
    erythrocyte_result: 0,
    erythrocyte_remark: '',
    hemoglobin_count: null,
    hemoglobin_result: 0,
    hemoglobin_remark: '',
    platelet_count: null,
    platelet_result: 0,
    platelet_remark: '',
  },
  otherInflammatory: {
    crp: null,
    crp_result: 0,
    crp_remark: '',
    esr: null,
    esr_result: 0,
    esr_remark: '',
    pct: null,
    pct_result: 0,
    pct_remark: '',
  },
  auxiliaryTests: {
    ndt: 0,
    ndt_checkup_time: null,
    ndt_remark: '',
    ct_mri: 0,
    ct_mri_checkup_time: null,
    ct_mri_remark: '',
    xdt: 0,
    xdt_checkup_time: null,
    xdt_remark: '',
    xbyx: 0,
    xbyx_checkup_time: null,
    xbyx_remark: '',
    fbyx: 0,
    fbyx_checkup_time: null,
    fbyx_remark: '',
  },
  gcs: {
    cr_gcs_sed: 0,
    cr_gcs_medicine: '',
    cr_gcs_medicine_dose: '',
    cr_athletic_ability: null,
    cr_language_trachea: 0,
    cr_language_ability: null,
    cr_eye_open_ability: null,
    et_gcs_sed: 0,
    et_gcs_medicine: '',
    et_gcs_medicine_dose: '',
    et_athletic_ability: null,
    et_language_trachea: 0,
    et_language_ability: null,
    et_eye_open_ability: null,
  },
  sofa: {
    sofa_score: null,
    breath: null,
    breath_support: 0,
    platelet: null,
    tbil: null,
    map: null,
    dopamine: null,
    epinephrine: null,
    noradrenaline: null,
    dobutaminer: 0,
    gcs: null,
    creatinine: null,
    tvu: null,
  },
  liverFunction: {
    alt: null,
    alt_result: 0,
    alt_remark: '',
    ast: null,
    ast_result: 0,
    ast_remark: '',
    albumin: null,
    albumin_result: 0,
    albumin_remark: '',
    tbil: null,
    tbil_result: 0,
    tbil_remark: '',
  },
  kidneyFunction: {
    bun: null,
    bun_result: 0,
    bun_remark: '',
    scr: null,
    scr_result: 0,
    scr_remark: '',
  },
  myocardialEnzyme: {
    ck: null,
    ck_result: 0,
    ck_remark: '',
    ckmb: null,
    ckmb_result: 0,
    ckmb_remark: '',
    ldh: null,
    ldh_result: 0,
    ldh_remark: '',
  },
  bloodGlucose: {
    blood_glucose: null,
    blood_glucose_result: 0,
    blood_glucose_remark: '',
  },
  serumIon: {
    potassium: null,
    potassium_result: 0,
    potassium_remark: '',
    natrium: null,
    natrium_result: 0,
    natrium_remark: '',
    chlorine: null,
    chlorine_result: 0,
    chlorine_remark: '',
    calcium: null,
    calcium_result: 0,
    calcium_remark: '',
  },
  bloodCoagulation: {
    pt: null,
    pt_result: 0,
    pt_remark: '',
    pta: null,
    pta_result: 0,
    pta_remark: '',
    inr: null,
    inr_result: 0,
    inr_remark: '',
    fib: null,
    fib_result: 0,
    fib_remark: '',
    d_dimer: null,
    d_dimer_result: 0,
    d_dimer_remark: '',
  },
  bloodPathogen: {
    je_igm_antibody: '',
    je_igm_antibody_result: '',
    mumps_viras: '',
    mumps_viras_result: '',
    vzv: '',
    vzv_result: '',
    hsv: '',
    hsv_result: '',
    measles_virus: '',
    measles_virus_result: '',
    rubella_viras: '',
    rubella_viras_result: '',
    ev71: '',
    ev71_result: '',
    cva16: '',
    cva16_result: '',
    cva10: '',
    cva10_result: '',
    cva6: '',
    cva6_result: '',
    other_viras: '',
    other_viras_result: '',
    iva: '',
    iva_result: '',
    ebv: '',
    ebv_result: '',
    mycoplasma_antibodies: '',
    mycoplasma_antibodies_result: '',
    cmv: '',
    cmv_result: '',
    tppa: '',
    tppa_result: '',
    trust_prp: 0,
    trust_prp_result: 0,
    titre_positive_remark: '',
    parasite_antibodies: '',
    parasite_antibodies_result: '',
    bat: '',
    bat_result: '',
    tbab: '',
    tbab_result: '',
    igra: 0,
    igra_a: '',
    igra_b: '',
    plasmodium: '',
    plasmodium_result: '',
    meningococcus: '',
    meningococcus_result: '',
    blood_culture: 0,
    blood_culture_result: 0,
    blood_culture_strain: '',
    other_body_fluid_culture: 0,
    other_body_fluid_culture_result: 0,
    other_body_fluid_culture_strain: ''
  },
})

const whetherOptions=[{"value":"1","label":"否"},{"value":"2","label":"是"}];
const whetherStatusOptions=[{"value":"1","label":"否"},{"value":"2","label":"是"},{"value":"3","label":"不详"}];
const studyTypeOptions=[{"value":"1","label":"回顾队列行"},{"value":"2","label":"前瞻性队列"}];
const nationOptions=[{value:"1",label:"汉族",},{value:"2",label:"满族",},{value:"3",label:"蒙古族"}];
const jobOptions=[{value:"1",label:"学生",},{value:"2",label:"老师",},{value:"3",label:"医生"}];
const drinkFrequencyOption=[{"value":"1","label":"偶尔"},{"value":"2","label":"经常"}]
const mindOptions=[{value:1,label:'清楚'},{value:2,label:'嗜睡'},{value:3,label:'昏睡'},{value:4,label:'昏迷'},]
const pupilOptions=[{value:1,label:'对称等圆'},{value:2,label:'不等大'},]
const lightReflexOptions=[{value:1,label:'灵敏'},{value:2,label:'不灵敏'},]
const meningealOptions=[{value:1,label:'未查'},{value:2,label:'阴性'},{value:3,label:'阳性'},]
const reflexOptions=[{value:1,label:'未查'},{value:2,label:'正常'},{value:3,label:'异常'},]
const muscularStrengthOptions=[{value:1,label:'未查'},{value:2,label:'正常'},{value:3,label:'异常'},]
const muscularTensionOptions=[{value:1,label:'未查'},{value:2,label:'正常'},{value:3,label:'增高'},{value:4,label:'减低'},]
const testOptions=[{value:1,label:'未查'},{value:2,label:'阴性'},{value:3,label:'阳性'},]
const rombergOptions=[{value:1,label:'未查'},{value:2,label:'稳'},{value:3,label:'不稳'},]
const feverOptions=[{value:1,label:'无'},{value:2,label:'轻<38°C'},{value:3,label:'中38~39°C'},{value:4,label:'重39°C以上'},]
const headacheOptions=[{value:1,label:'无'},{value:2,label:'轻,时有头痛'},{value:3,label:'中,持续不止,疼痛可忍'},{value:4,label:',持续不止,剧烈难忍'},]
const stiffNeckOptions=[{value:1,label:'无'},{value:2,label:'轻,颌下1指'},{value:3,label:'中,颌下2指'},{value:4,label:'重,颌下3指以上'},]
const dizzinessOptions=[{value:1,label:'无'},{value:2,label:'轻,头晕眼花，时作时止'},{value:3,label:'中,视物旋转，不能行走'},{value:4,label:'重,眩晕欲仆,不能站立'},]
const sleepinessOptions=[{value:1,label:'无'},{value:2,label:'轻,嗜睡'},{value:3,label:'中,迷蒙'},{value:4,label:'重,神迷'},]
const convulsionOptions=[{value:1,label:'无'},{value:2,label:'轻,每日2次以下'},{value:3,label:'中,每日3~6次'},{value:4,label:'重,每日7次以上或角弓反张'},]
const deliriumOptions=[{value:1,label:'无'},{value:2,label:'轻,有喃喃自语'},{value:3,label:'中,语无伦次'},{value:4,label:'重,语言粗乱频繁'},]
const thirstOptions=[{value:1,label:'无'},{value:2,label:'轻,口唇干燥'},{value:3,label:'中,口渴喜饮'},{value:4,label:'重,口渴频饮'},]
const irritabilityOptions=[{value:1,label:'无'},{value:2,label:'轻,偶有烦躁'},{value:3,label:'中,间断性烦热躁动'},{value:4,label:'重,持续性烦热躁动'},]
const fatigueOptions=[{value:1,label:'无'},{value:2,label:'轻,肢体发重'},{value:3,label:'中,肢体重滞'},{value:4,label:'重,肢体困重'},]
const vomitingOptions=[{value:1,label:'无'},{value:2,label:'轻,时有恶心'},{value:3,label:'中,阵阵恶心'},{value:4,label:'重,频频作呕'},]
const simpleSymptoms=[{key:'palpitations',label:'心悸'},{key:'shortness_of_breath',label:'气短'},{key:'chest_tightness',label:'胸闷'},{key:'chest_pain',label:'胸痛'},{key:'abdominal_pain',label:'腹痛'},{key:'abdominal_distension',label:'腹胀'},{key:'diarrhea',label:'腹泻'},{key:'constipation',label:'便秘'},{key:'edema',label:'水肿'},{key:'petechia',label:'瘀点'},{key:'tinnitus',label:'耳鸣'},{key:'bitter_mouth',label:'口苦'},{key:'nausea',label:'恶心'},{key:'cough',label:'咳嗽'},{key:'phlegm',label:'咳痰'},{key:'weak',label:'乏力'},{key:'wind_chill',label:'恶风寒'},{key:'chills',label:'寒颤'},{key:'sweating',label:'出汗'},{key:'rash',label:'皮疹'},]
const tongueColorOptions=[{value:'1',label:'淡红'},{value:'2',label:'淡白'},{value:'3',label:'淡紫'},{value:'4',label:'红'},{value:'5',label:'绛'},{value:'6',label:'青'},{value:'7',label:'紫暗'},]
const tongueBodyOptions=[{value:'1',label:'荣'},{value:'2',label:'枯'},{value:'3',label:'瘦'},{value:'4',label:'胖'},{value:'5',label:'齿痕'},{value:'6',label:'点刺'},{value:'7',label:'裂纹'},{value:'8',label:'舌体瘀斑'},]
const tongueCoatedOptions=[{value:'1',label:'薄'},{value:'2',label:'厚'},{value:'3',label:'润'},{value:'4',label:'少津'},{value:'5',label:'燥'},{value:'6',label:'糙'},{value:'7',label:'焦'},{value:'8',label:'枯'},{value:'9',label:'腻'},{value:'a',label:'腐'},{value:'b',label:'剥'},{value:'c',label:'类剥'},{value:'d',label:'无苔'},]
const tongueCoatedColorOptions=[{value:'1',label:'白'},{value:'2',label:'略黄'},{value:'3',label:'黄'},{value:'4',label:'灰'},{value:'5',label:'黑'},]
const pulseOptions=[{value:'1',label:'浮'},{value:'2',label:'沉'},{value:'3',label:'弦'},{value:'4',label:'滑'},{value:'5',label:'细'},{value:'6',label:'数'},{value:'7',label:'濡'},{value:'8',label:'缓'},{value:'9',label:'涩'},{value:'a',label:'迟'},{value:'b',label:'长'},{value:'c',label:'短'},{value:'d',label:'虚'},{value:'e',label:'弱'},{value:'f',label:'结代'},]
const fingerprintOptions=[{value:'1',label:'浮'},{value:'2',label:'沉'},{value:'3',label:'红'},{value:'4',label:'紫'},{value:'5',label:'淡'},{value:'6',label:'滞'},{value:'7',label:'风关'},{value:'8',label:'气关'},{value:'9',label:'命关'},]
const auxiliaryTestItems=[{key:'ndt',label:'脑电图'},{key:'ct_mri',label:'头部CT或MRI'},{key:'xdt',label:'心电图'},{key:'xbyx',label:'胸部影像'},{key:'fbyx',label:'腹部影像'},]
const auxiliaryTestOptions=[{value:0,label:'未查'},{value:1,label:'正常'},{value:2,label:'异常无临床意义'},{value:3,label:'异常有临床意义'},]
const bloodRoutineItems=[{key:'leukocyte_count',label:'白细胞计数',unit:'10^9/L'},{key:'neutrophil_percentage',label:'中性粒细胞百分比',unit:'%'},{key:'lymphocyte_percentage',label:'淋巴细胞百分比',unit:'%'},{key:'erythrocyte_count',label:'红细胞计数',unit:'10^12/L'},{key:'hemoglobin_count',label:'血红蛋白',unit:'g/L'},{key:'platelet_count',label:'血小板计数',unit:'10^9/L'},]
const otherInflammatoryItems=[{key:'crp',label:'C反应蛋白',unit:'mg/L'},{key:'esr',label:'红细胞沉降率',unit:'mm/60min'},{key:'pct',label:'降钙素原',unit:'ng/ml'},]
const resultOptions=[{value:0,label:'未查'},{value:1,label:'正常'},{value:2,label:'异常无临床意义'},{value:3,label:'异常有临床意义'},]
const liverFunctionItems=[{key:'alt',label:'谷丙转氨酶',unit:'IU/L'},{key:'ast',label:'谷草转氨酶',unit:'IU/L'},{key:'albumin',label:'白蛋白',unit:'g/L'},{key:'tbil',label:'总胆红素',unit:'umol/L'},]
const kidneyFunctionItems=[{key:'bun',label:'血尿素氮',unit:'mmol/L'},{key:'scr',label:'血肌酐',unit:'umol/L'},]
const myocardialEnzymeItems=[{key:'ck',label:'肌酸激酶',unit:'U/L'},{key:'ckmb',label:'肌酸激酶同工酶',unit:'IU/L'},{key:'ldh',label:'乳酸脱氢酶',unit:'IU/L'},]
const serumIonItems=[{key:'potassium',label:'钾'},{key:'natrium',label:'钠'},{key:'chlorine',label:'氯'},{key:'calcium',label:'钙'},]
const bloodCoagulationItems=[{key:'pt',label:'凝血酶时间',unit:'s'},{key:'pta',label:'凝血酶原时间活动度',unit:'%'},{key:'inr',label:'国际标准化比值',unit:''},{key:'fib',label:'纤维蛋白原',unit:'g/L'},{key:'d_dimer',label:'D-二聚体',unit:'mg/L'},]
const colorOptions=[{value:1,label:'无色'},{value:2,label:'红色'},{value:3,label:'黄色'},{value:4,label:'乳白色'},{value:5,label:'微绿色'},{value:6,label:'褐色'},{value:7,label:'黑色'},];
const clarityOptions=[{value:1,label:'清晰'},{value:2,label:'透明'},{value:3,label:'微混'},{value:4,label:'混浊'},{value:5,label:'毛玻璃状'},{value:6,label:'凝块'},{value:7,label:'薄膜'},];

const cellCountItems=[{key:'cbc',label:'总细胞计数'},{key:'rbc',label:'红细胞计数'},{key:'wbc',label:'有核细胞计数'},{key:'protein_assay',label:'蛋白定量'},{key:'sugar_quantify',label:'糖定量'},{key:'chlorid',label:'氯化物含量'},];
const otherTestItems=[{key:'bacterial_smear',label:'细菌涂片'},{key:'bacterial_culture',label:'细菌培养'},{key:'fungal_culture',label:'真菌培养'},{key:'acid_fast_stain',label:'抗酸染色'},{key:'india_ink_stain',label:'墨汁染色'},{key:'crag_test',label:'新型隐球菌抗原'},{key:'je_igm_abs',label:'乙脑IgM抗体'},{key:'tppa',label:'TPPA'},{key:'trust_prp',label:'TRUST或RPR滴度'},{key:'parasite_antibodies',label:'寄生虫抗体'},{key:'paraneoplastic',label:'副肿瘤指标'},{key:'csf_ocb',label:'特异性寡克隆区带'},{key:'autoimmune_encephalitis',label:'自身免疫性脑炎'},{key:'other_pathogen',label:'其他病原学检测'},];

const admission_date = ref("");

const disabledDate = (time: Date) => {
  return time.getTime() > Date.now();
};
const shortcuts=[{text:"今天",value:new Date(),},{text:"昨天",value:()=>{const date=new Date();date.setTime(date.getTime()-3600*1000*24);return date;},},{text:"一周前",value:()=>{const date=new Date();date.setTime(date.getTime()-3600*1000*24*7);return date;},},];

const otherHistoryItems=[{key:'touch_history',label:'接触史'},{key:'mosquito_bite_history',label:'蚊虫叮咬史'},{key:'medicine_allergy_history',label:'药物过敏'},{key:'family_disease_history',label:'家族疾病'},{key:'previous_history',label:'既往史'},{key:'prehospital_treatment_history',label:'院前治疗史'},{key:'other_epidemiology',label:'其他流行病学情况'},];
const bloodPathogenItems=[{key:'je_igm_antibody',label:'血乙脑IgM抗体'},{key:'mumps_viras',label:'腮腺炎病毒'},{key:'vzv',label:'水痘-带状疱疹病毒'},{key:'hsv',label:'单纯疱疹病毒'},{key:'measles_virus',label:'麻疹病毒'},{key:'rubella_viras',label:'风疹病毒'},{key:'ev71',label:'肠道病毒71型'},{key:'cva16',label:'柯萨奇A16'},{key:'cva10',label:'柯萨奇A10'},{key:'cva6',label:'柯萨奇A6'},{key:'other_viras',label:'其他肠道病毒'},{key:'iva',label:'流感病毒'},{key:'ebv',label:'EB病毒'},{key:'mycoplasma_antibodies',label:'支原体抗体'},{key:'cmv',label:'巨细胞病毒'},{key:'tppa',label:'TPPA'},{key:'trust_prp',label:'TRUST或RPR滴度'},{key:'parasite_antibodies',label:'寄生虫抗体'},{key:'bat',label:'布氏杆菌凝集试验'},{key:'tbab',label:'结核抗体'},{key:'plasmodium',label:'血涂片见疟原虫'},{key:'meningococcus',label:'血涂片见脑膜炎奈瑟球菌'},]
const resultOptionsStr = [
  { value: '0', label: '未查' },
  { value: '1', label: '正常' },
  { value: '2', label: '异常无临床意义' },
  { value: '3', label: '异常有临床意义' },
];
</script>
